;实现把字符串中的小写字母变换为对应的大写字母，设字符串以0结尾


assume cs:code,ds:data

data segment 

string db "hello WORLD", 0

data ends

code segment 

start:
		mov ax, data
		mov ds, ax
		mov ax, offset string
		mov si, ax
		sub si, 1
		
convert1:
		inc si
		cmp byte ptr [si], 0
		jz exit
		cmp byte ptr [si], 60h
		ja convert2
		jmp convert1
		
		
		

convert2:
		cmp byte ptr [si], 7ah
		ja convert1
		mov al, [si]
		sub al, 20h
		mov [si], al
		jmp convert1
		;
exit:
		mov ax, 4c00h
		int 21h


code ends
		end start